
J.wl.rc({
    Qk: function(a, b, c, d) {
        var f = this.G.la,
            g = this.G.Hx,
            h = b[this.Tv];
        c = c.split("&");
        var k = "Microsoft YaHei",
            l = parseInt(c[this.Bx]),
            m = J.e.Lh(c[this.Ax]),
            n = 400,
            q,
            r = J.e.dr(b[this.Cw]);
        if (! (255 < r[0] || 0 > r[0] || 255 < r[1] || 0 > r[1])) {
            "v4" === this.G.gr || "roadlabel" !== d.type || b[this.dj] || (r[0] += l / 2, r[1] -= l / 2);
            f && (l *= g);
            var s = new J.R.fd(this.wC(r, a.ma, d.sc));
            s.name = h.replace("^", "");
            s.Dd = r;
            s.Wc = [];
            s.Cf = [];
            c[this.Uq] && (q = J.e.Lh(c[this.Uq]));
            r = null;
            if ("roadlabel" === d.type) d = !1,
            (c = c[this.cf]) && b[this.dj] && (s.Wc.push(this.$u + (10 > a.ma.z ? "39": "18") + "/1/" + c + ".png"), m = "152" === c ? "black": "white", q = null, n = b[this.dj], f && (n[0] *= g, n[1] *= g, n[2] *= g, n[3] *= g), s.Cf.push(n), n = 800, k = "Arial Narrow,Arial", d = !0),
            d && (r = J.f.aa ? 44 : 22, f && (r *= g)),
                l = Math.round(l),
                n = this.iv(a, h, k, l, m, q, n, r),
                s.Wc.push(n),
                a = Math.floor(n.ym / 2),
            r && (a = Math.min(r / 2, a)),
                1 < h.length || d ? s.Cf.push([ - a, Math.floor( - n.ED / 2 - 1), l * h.length, l, n.qq, n.rq, n.wi, n.Dk]) : (a = "v4" !== this.G.gr ? Math.ceil( - l / 2) : -a, s.Cf.push([a, Math.floor( - l / 2), l * h.length, l, n.qq, n.rq, n.wi, n.Dk])),
                s.Gq = b[this.Qo] ? 5 > b[this.Qo] ? 0 : b[this.Qo] : 0;
            else {
                if (J.m.gF) return null;
                h = h.split("^");
                d = b[this.XG];
                c[this.cf] && b[this.dj] && (s.FE = !0, s.Wc.push(this.$u + (10 > a.ma.z ? "39": "18") + "/1/" + c[this.cf] + ".png"), n = b[this.dj], "334" === c[this.cf] && f && (n[0] = n[1] = -7, n[3] = n[2] = 15), "445" === c[this.cf] && f && (n[0] = -3, n[1] = -6, n[3] = 13, n[2] = 6), "301" === c[this.cf] && f && (n[1] = n[0], n[3] = n[2]), f && (n[0] *= g, n[1] *= g, n[2] *= g, n[3] *= g), s.Cf.push(n));
                if (0 < d.length) for (var t = 0,
                                           u = 0; u < d.length; u += 1) {
                    var n = h[u],
                        v = d[u][0],
                        x = d[u][1] + u;
                    if ("375" === c[this.cf] || "3751" === c[this.cf]) l = 12,
                        x = -5,
                        r = 15,
                    f && (l *= g, r *= g);
                    l = Math.round(l);
                    n = this.iv(a, n, k, l, m, q, null, r, c[this.VG]);
                    f && (v *= g, x *= g, d[u][2] *= g, d[u][3] *= g);
                    if ("375" === c[this.cf] || "3751" === c[this.cf]) v = -Math.min(n.ym / 2, r / 2);
                    t < n.ym && (t = n.ym);
                    s.Wc.push(n);
                    x -= J.f.aa ? 3 : 1;
                    s.Cf.push([v, x, d[u][2], d[u][3], n.qq, n.rq, n.wi, n.Dk])
                }
                b[4] && (s.xw = b[4])
            }
            return s
        }
    },
    BI: function() {
        return document.createElement("img")
    },
    gE: function(a) {
        return Math.min(Math.max(100 * (a - this.pC), 400), 800)
    },
    iv: function(a, b, c, d, f, g, h, k, l) {
        var m = a.JE;
        m || (m = J.a.create("canvas"), a.JE = m, m.width = m.height = this.Xp, m.nw = m.ow = 0);
        var n = m.getContext("2d");
        h = h || this.gE(d);
        var q = this.G.la ? this.G.Hx: 1,
            r = l ? 2 * q: 0;
        a = (d + 2) * b.length + 2;
        var s = d + 5 * q,
            t = m.nw,
            u = m.ow;
        t + a > this.Xp && (t = 0, u += m.maxHeight, u > this.Xp && (m.maxHeight = 0));
        m.maxHeight = Math.max(m.maxHeight || 0, s);
        n.font = h + " " + d + "px " + c;
        d = parseInt(n.font);
        if (100 < d || !d) d = parseInt(n.font.split(" ")[1]);
        c = d * b.length;
        g && (n.strokeStyle = g, n.strokeText(b, t + r, u + d, k || c));
        g = n.measureText(b).width;
        l && (n.fillStyle = J.e.Lh(l), n.fillRect(t, u, g + 4 * q, d + 4 * q + J.f.aa));
        n.fillStyle = f;
        n.fillText(b, t + r, u + d, k || c);
        m.nw = t + a;
        m.ow = u;
        b = m;
        b.ym = g;
        b.ED = d;
        b.wi = a;
        b.Dk = s;
        b.qq = t;
        b.rq = u;
        return b
    }
});
J.L.canvas.ke.rc({
    Ad: function() {
        this.ka = document.createElement("div");
        this.Kh = document.createElement("canvas");
        this.lb = new J.L.canvas.ke.nc(this.Kh, this.Cl);
        this.um = document.createDocumentFragment()
    },
    XF: function(a) {
        var b = Math.pow(2, a.sa.zoom - this.qb),
            c = this.I.la ? 2 : 1,
            d = a.sa.Oa.Ba(this.Iv).tb(this.ab);
        this.transform = [{
            translate: this.transform[0].translate.add(d),
            scale: b,
            rotate: 0
        },
            {
                translate: this.transform[1].translate.add(d.Mb(c)),
                scale: b / c,
                rotate: 0,
                Qd: 1
            }];
        this.Oa = a.sa.Oa
    },
    WF: function(a, b) {
        var c = Math.pow(2, a.sa.zoom - this.bd);
        if (3 < c || 0.6 > c) this.Rw(a, b);
        else {
            var d = a.sa.Oa.Ba(this.Iv).tb(this.Df);
            this.transform[0] = {
                translate: this.transform[0].translate.add(d),
                scale: c,
                rotate: 0
            };
            c = this.xc;
            this.Om(a, 256 * c.Tk, 256 * c.Km);
            c = new J.C(a.Ha.Ya.x * (this.I.la ? this.I.ze: 1), a.Ha.Ya.y * (this.I.la ? this.I.ze: 1));
            this.transform[2] = {
                translate: c,
                scale: 1 / (this.I.la ? this.I.ze: 1),
                rotate: 0,
                Qd: this.I.get("textIndex")
            };
            this.Oa = a.sa.Oa
        }
    },
    Rw: function(a, b) {
        if (!this.U || 3E4 < Math.abs(this.Oa.x - this.U.x) / this.N || 3E4 < Math.abs(this.Oa.y - this.U.y) / this.N) this.U = this.Oa;
        this.bd = this.qb;
        this.Df = this.ab;
        this.Bq = !1;
        this.currentTime = +new Date;
        this.oH = b.oH;
        var c = this.xc;
        this.eh = [256 * c.Nd * this.ab, 256 * c.Lc * this.ab];
        this.jf = b.cm;
        var d = this.Yq,
            f = 256 * c.Tk,
            c = 256 * c.Km;
        this.gf = this.zoom << 0 !== this.zoom;
        var g = this.Oa.Ba(this.U);
        g.x < -J.e.Sa / 2 && (g.x += J.e.Sa);
        g.x > J.e.Sa / 2 && (g.x -= J.e.Sa);
        this.zC = g.tb(this.ab);
        this.lG(d, f, c, b);
        this.Om(a, f, c);
        this.eF = !1;
        this.Bq && this.set("display", 0);
        this.tc(a)
    },
    Mc: function(a, b) {
        this.xq(a, b);
        a.Zq || a.en && J.f.Gd || a.gq && a.qC ? this.XF(a, b) : a.gf ? this.WF(a, b) : this.Rw(a, b);
        this.Iv = this.Oa
    },
    mi: function() {
        for (var a = this.ka.childNodes.length; 0 <= a; a -= 1) this.ka.childNodes[a] && this.ka.childNodes[a].Jb !== this.Jb && this.ka.removeChild(this.ka.childNodes[a])
    },
    lG: function(a) {
        var b = this.Jb;
        this.Jb += 1;
        var c = !1,
            d, f, g, h = !1,
            k = [];
        this.U.x - this.Oa.x < -J.e.Sa / 2 ? this.U = new J.C(this.U.x + J.e.Sa, this.U.y) : this.U.x - this.Oa.x > J.e.Sa / 2 && (this.U = new J.C(this.U.x - J.e.Sa, this.U.y));
        for (d = a.length - 1; 0 <= d; d -= 1) if (g = a[d], f = g.wc, g.length) {
            var h = !1,
                l = Math.pow(2, f - this.qb);
            if (1 >= l && !k.Ki || k.Ki && k.Ki.scale < l) k.Ki = [],
                k.Ki.scale = l,
                h = !0;
            for (var m = this.Zk(this.qb, f), n = g.length - 1; 0 <= n; n -= 1) {
                l = g[n];
                h && k.Ki.push(l);
                if (!l.jb && this.U === l.U && l.bd === this.bd) {
                    var q = l.pc;
                    if (q && q.parentNode === this.ka) {
                        k.push(l);
                        q.Jb = this.Jb;
                        l.Jb = this.Jb;
                        continue
                    }
                }
                l.U = this.U;
                l.bd = this.bd;
                f = l.ma;
                var c = !0,
                    q = new J.C(f.x * m * this.ab, f.y * m * this.ab),
                    r = q.Ba(this.Oa);
                r.x < -J.e.Sa / 2 ? q.x += J.e.Sa: r.x > J.e.Sa / 2 && (q.x -= J.e.Sa);
                r = q.Ba(this.U);
                r = r.tb(this.ab);
                if (!l.Bl || this.es && l.Jb !== b) l.Bl = this.currentTime;
                l.Xj = !1;
                l.ya ? (l.Jb = this.Jb, q = l.pc, !q && l.jb && l.jb.pc && (q = l.jb.pc), q && (l.Ij = 1, this.xp(q, r.x, r.y, m, m, 1, f.z), this.ka.appendChild(q), q.Jb = this.Jb, l.qb = this.qb, k.push(l))) : l.Bc = null
            }
            h = !0
        }
        this.Mf = k;
        this.mi();
        return c || !h
    },
    Om: function(a) {
        var b = this.Kh,
            c = this.lb;
        c.gf = this.gf;
        var d = this.I.la ? this.I.ze: 1;
        0 !== a.sa.rotation ? J.a.Vw(b, 2 * Math.floor(a.Ha.Ya.x) * d, 2 * Math.floor(a.Ha.Ya.y) * d, !0) : J.a.Vw(b, a.size.width * d, a.size.height * d, !0);
        c.eh = [a.Ha.Za.x, a.Ha.Za.y];
        this.lb.ab = this.N * (this.I.la ? 1 / this.I.ze: 1);
        if ((a = this.Mf.Ki) && a.length && !(0.6 < a[0].ma.z - this.zoom)) for (b = a.length - 1; 0 <= b; b -= 1) c = a[b].Jc,
            d = !1,
        !c && a[b].jb && a[b].jb.Jc && (c = a[b].jb.Jc, d = !0),
            this.lb.Om(c || {},
                d)
    },
    tc: function(a) {
        var b = Math.pow(2, this.zoom - this.qb),
            c = this.Oa.Ba(this.U);
        c.x < -J.e.Sa / 2 && (c.x += J.e.Sa);
        c.x > J.e.Sa / 2 && (c.x -= J.e.Sa);
        c.tb(this.ab);
        a = new J.C(a.Ha.Ya.x * (this.I.la ? this.I.ze: 1), a.Ha.Ya.y * (this.I.la ? this.I.ze: 1));
        this.transform = [{
            translate: this.zC,
            scale: b,
            rotate: 0
        },
            {
                translate: a,
                scale: 1 / (this.I.la ? this.I.ze: 1),
                rotate: 0,
                Qd: this.I.get("textIndex")
            }]
    }
});
J.L.canvas.ke.nc.rc({
    Om: function(a, b) {
        for (var c = 0; c < a.length; c += 1) {
            var d = a[c].Pa,
                f = d[0];
            b && (f > J.e.Sa / 2 ? f -= J.e.Sa: f < J.e.Sa / 2 && (f += J.e.Sa));
            d = this.ob(f, d[1]);
            for (f = 0; f < a[c].Wc.length; f += 1) this.cG(d, a[c].Wc[f], a[c].Cf[f], a[c].Gq)
        }
    },
    cG: function(a, b, c, d) {
        var f = this.kb.getContext("2d");
        if (b = this.aj(b)) {
            var g = c[2],
                h = c[3],
                k = c[0],
                l = c[1];
            d = d % 360 * -Math.PI / 180;
            if (0 !== d) {
                var m = Math.cos(d),
                    n = Math.sin(d),
                    q = a[0],
                    r = a[1];
                f.transform(m, n, -n, m, (1 - m) * q + n * r, (1 - m) * r - n * q)
            }
            4 === c.length ? f.drawImage(b, a[0] + k, a[1] + l, g, h) : f.drawImage(b, c[4], c[5], c[6], c[7], a[0] + k, a[1] + l, c[6], c[7]);
            0 !== d && f.setTransform(1, 0, 0, 1, 0, 0)
        }
    }
});